﻿@using Janus.Mes.WebClient;
@using Janus.BaseEntitys;
@using Janus.Mes.VO;
@model CheckFeatureVO
@{
    Layout = null;
    ViewBag.ViewTitle = "检验特性";
    if (ViewBag.IsCreate)
    {
        Model.IsEnable = true;
    }
    //IEnumerable<SelectListItem> CheckProject = new SelectList(ViewData["CheckProject"] as List<CheckProjectVO> ?? new List<CheckProjectVO>(), "CheckPCode", "CheckPName");
}
<div class="pageContent">
    <form method="post" action="BaseData/CheckFeature/create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone);">
        @Html.ValidationSummary(true)
        <div class="pageFormContent" layouth="56">
            <input id="hidIsCreate" name="hidIsCreate" type="hidden" value="@ViewBag.IsCreate" />
            @Html.HiddenFor(model => model.Id)
            <p>
                <label>
                    检验特性编号：
                </label>
                @if (ViewBag.IsCreate == true)
                {
                    @Html.TextBoxFor(c => c.FeatCode, new { @class = "required IsExisted", ajaxurl = "BaseData/CheckFeature/IsExist" })
                }
                else
                {
                    @Html.TextBoxFor(c => c.FeatCode, new { @Readonly = "true" })
                }
                @Html.ValidationMessageFor(c => c.FeatCode)
            </p>
            <p>
                <label>
                    检验特性：
                </label>
                @Html.TextBoxFor(c => c.FeatName, new { @class = "required" })
                @Html.ValidationMessageFor(c => c.FeatName)
            </p>
            <p>
                <label>
                    检验项目：
                </label>
                @Html.SelectCheckProject(new { @class = "treetable select3 required", @name = "CheckPCode", id = "CheckPCode", selectedvalue = Model.CheckPCode })
            </p>
            <p>
                <label>
                    启用：
                </label>
                @Html.CheckBoxFor(c => c.IsEnable, new { @onclick = "return false" })
            </p>
            <label style="float:left">控制数据</label>     
             <div style="float:left;width:160px;height:21px">
                <input type="radio" id="rdoqualitative" name="Controldata" value="1" /><span>定性</span>
                <input type="radio" id="rdoration" name="Controldata" value="2" /><span>定量</span>
            </div>
            <label style="float:left;margin-left:88px">启用模块</label>
           
            <div style="float:left;width:200px;height:21px">
                <input type="radio" id="rdoqualitative" name="EnableSystem" value="1" /><span>尺寸测量</span>
                <input type="radio" id="rdoration" name="EnableSystem" value="2" /><span>信赖性测试</span>
                <input type="radio" id="rdorationwu" name="EnableSystem" value="3" /><span>无</span>
            </div>
            <p>
                <label>
                    缺陷等级：
                </label>
                @Html.SelectDefectLName(new { @class = "treetable select3 required", @name = "DefectLCode", id = "DefectLCode", selectedvalue = Model.DefectLCode })
               
            </p>
            <p>
                <label>
                    是否破坏
                </label>
                @Html.CheckBoxFor(c => c.IsDestroy)
                @Html.ValidationMessageFor(c => c.IsDestroy)
            </p>
            
            <p style="width:100%;height:50px">
                <label>
                    备注：
                </label>
                @Html.TextAreaFor(c => c.Remark, new { @style = "width:50%;height:30px" })
            </p>

            @Html.Partial("Operation", Model)
        </div>
        @Html.Partial("FormButtonBar")
    </form>
</div>
